<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="cartList.title"/></title>
    <meta name="heading" content="<fmt:message key='cartList.heading'/>"/>
    <meta name="menu" content="MaterialMenu"/>

</head>


<c:set var="buttons">
    <input type="button" style="margin-right: 5px"
           onclick="location.href='<c:url value="/saveCart.html"/>'"
           value="<fmt:message key="button.save"/>"/>

    <input type="button" onclick="location.href='<c:url value="/mainMenu.html"/>'"
           value="<fmt:message key="button.back"/>"/>
</c:set>

<c:out value="${buttons}" escapeXml="false" />

<s:set name="carts" value="carts" scope="request"/>
<br><br>
cart.price= ${tp} $
<br><br>
<display:table name="requests" class="table" requestURI="" id="requestList" export="true" pagesize="25">
    <display:column href="editCart.html"
                    paramId="id" paramProperty="id"/>
    <display:column property="dateRequestClient" sortable="true" titleKey="cart.dateRequestClient"/>
    <display:column property="product.name" sortable="true" titleKey="product.name"/>
    <display:column property="quantity" sortable="true" titleKey="cart.quantity"/>
    <display:column property="price" sortable="true" titleKey="cart.price"/>
    <display:column property="totalPrice" sortable="true" titleKey="cart.totalPrice"/>
    <display:column titleKey="delete" >
        <a href="<c:url value='deleteRequestClient.html?row=${requestList_rowNum}'/>"
           title="Delete" ><img alt="hola mundo" src="<c:url value="/images/iconTrash.gif"/>"></a>
    </display:column>
    <display:setProperty name="export.excel.filename" value="Cart List.xls"/>
    <display:setProperty name="export.csv.filename" value="Cart List.csv"/>
    <display:setProperty name="export.pdf.filename" value="Cart List.pdf"/>
    <display:setProperty name="paging.banner.some_items_found" value=""/>
    <display:setProperty name="paging.banner.all_items_found" value=""/>

</display:table>
<display:table name="requestsSaved" class="table" requestURI="" id="requestsSaved" export="true" pagesize="25">
    <display:column href="editCart.html"
                    paramId="id" paramProperty="id"/>
    <display:column property="dateRequestClient" sortable="true" titleKey="cart.dateRequestClient"/>
    <display:column property="product.name" sortable="true" titleKey="product.name"/>
    <display:column property="quantity" sortable="true" titleKey="cart.quantity"/>
    <display:column property="price" sortable="true" titleKey="cart.price"/>
    <display:column property="totalPrice" sortable="true" titleKey="cart.totalPrice"/>
    <display:column titleKey="delete" >
        <a href="<c:url value='deleteRequestClient.html?row=${requestSaved_rowNum}'/>"
           title="Delete" ><img alt="hola mundo" src="<c:url value="/images/iconTrash.gif"/>"></a>
    </display:column>
    <display:setProperty name="export.excel.filename" value="Cart List.xls"/>
    <display:setProperty name="export.csv.filename" value="Cart List.csv"/>
    <display:setProperty name="export.pdf.filename" value="Cart List.pdf"/>
    <display:setProperty name="paging.banner.some_items_found" value=""/>
    <display:setProperty name="paging.banner.all_items_found" value=""/>

</display:table>

<c:out value="${buttons}" escapeXml="false" />

<script type="text/javascript">
    highlightTableRows("cartList");
</script>